home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / ddj0897.zip / DYN401.ZIP / examples / exam13 / main.c < prev    next >
C/C++ Source or Header  |  1995-09-27  |  1KB  |  80 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6. /*
  7.  *
  8.  *    This source code is CONFIDENTIAL and
  9.  *    PROPRIETARY to Algorithms Corporation. Unauthorized
  10.  *    distribution, adaptation or use    may
  11.  *    be subject to civil and    criminal penalties.
  12.  *
  13.  *    Copyright (c) 1993 Algorithms Corporation
  14.  *    3020 Liberty Hills Drive
  15.  *    Franklin, TN  37064
  16.  *
  17.  *    ALL RIGHTS RESERVED.
  18.  *
  19.  *
  20.  *
  21.  */
  22.  
  23.  
  24.  
  25. #include "generics.h"
  26.  
  27.  
  28. main(int argc, char *argv[])
  29. {
  30.     object    obj1, obj2;
  31.  
  32.     InitDynace(&argc);
  33.  
  34.     /*  Create two instances of the Class1 class.  */
  35.  
  36.     obj1 = gNew(Class1);
  37.     obj2 = gNew(Class1);
  38.  
  39.     /*  Set each instance to a different name.  */
  40.  
  41.     gSetName(obj1, "Object One");
  42.     gSetName(obj2, "Object Two");
  43.  
  44.     /*  Display the independent values associated with each instance.  */
  45.  
  46.     printf("obj1's name is %s\n", gGetName(obj1));
  47.     printf("obj2's name is %s\n", gGetName(obj2));
  48.  
  49.  
  50.     gDispose(obj1);
  51.     gDispose(obj2);
  52.  
  53.     return 0;
  54. }
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62. /*
  63.  *
  64.  *    This source code is CONFIDENTIAL and
  65.  *    PROPRIETARY to Algorithms Corporation. Unauthorized
  66.  *    distribution, adaptation or use    may
  67.  *    be subject to civil and    criminal penalties.
  68.  *
  69.  *    Copyright (c) 1993 Algorithms Corporation
  70.  *    3020 Liberty Hills Drive
  71.  *    Franklin, TN  37064
  72.  *
  73.  *    ALL RIGHTS RESERVED.
  74.  *
  75.  *
  76.  *
  77.  */
  78.  
  79.  
  80.